package com.xuecheng.api.media;

import com.xuecheng.framework.domain.media.response.CheckChunkResult;
import com.xuecheng.framework.model.response.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile;

@Api(description = "媒体资源文件 提供增删改查功能")
public interface MediaControllerApi {
    @ApiOperation("文件上传前注册")
    public ResponseResult fileRegister(
            String fileMd5,
            String fileName,
            Long fileSize,
            String mimetype,
            String fileExt
    );

    @ApiOperation("前校验分块")
    public CheckChunkResult checkchunk(
            String fileMd5,
            // 当前分块下标
            Integer chunk,
            // 当前分块大小
            Integer chunkSize
    );
    @ApiOperation("上传分块")
    public ResponseResult uploadchunk(
            MultipartFile file,
            Integer chunk,
            String fileMd5
    );
    @ApiOperation("合并分块")
    public ResponseResult mergechunks(
            String fileMd5,
            String fileName,
            Long fileSize,
            String mimetype,
            String fileExt
    );
}
